﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using FrameWork.Controls;

namespace Test
{
    public partial class Form1 : Form
    {
       
        public Form1()
        {
            InitializeComponent();


            DirectUIPanel directUIPanel = new DirectUIPanel();
            directUIPanel.Width = 100;
            directUIPanel.Height = 23;
            directUIPanel.Left = 60;
            directUIPanel.Top = 160;
            directUIPanel.BackColor = Color.Black;
            this.directUIHost1.Add(directUIPanel);

            DirectUILabel directUiLabel = new DirectUILabel();
            directUiLabel.Font = new Font("宋体", 12F);
            directUiLabel.Width = 100;
            directUiLabel.Height = 23;
            directUiLabel.Click += DirectUiLabel_Click;
            directUiLabel.ForeColor = Color.BlueViolet;
            directUiLabel.Text = "aaa";
            directUiLabel.Left = 60;
            this.directUIHost1.Add(directUiLabel);

            DirectUIButton directUIButton = new DirectUIButton();
            directUIButton.Font = new Font("宋体", 12F);
            directUIButton.Text = "Click me";
            directUIButton.Width = 100;
            directUIButton.Click += DirectUIButton_Click;
            directUIButton.Height = 23;
            directUIButton.ForeColor = Color.BlueViolet;
            directUIButton.Left = 160;
            this.directUIHost1.Add(directUIButton);
            //DirectUIHost host = new DirectUIHost();
            //np = new NavigationPanel();
            //host.Bounds = this.ClientRectangle;

            ////np.Bounds = this.ClientRectangle;
            ////Page page1 = new Page();
            ////DirectUILabel lb1 = new DirectUILabel("hello1", 0, 0, 200, 200);
            ////page1.Add(lb1);
            ////page1.Title = "page1";
            ////page1.Bounds = np.ClientRectangle;
            ////np.Pages.Add(page1);
            ////Page page2 = new Page();
            ////DirectUILabel lb2 = new DirectUILabel("hello2", 0, 0, 200, 200);
            ////page2.Add(lb2);
            ////page2.Title = "page2";
            ////page2.Bounds = np.ClientRectangle;
            ////np.Pages.Add(page2);
            //this.Controls.Add(host);

            ////np.SelectedIndex = 0;
        }

        private void DirectUIButton_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Click Me");
        }

        private void DirectUiLabel_Click(object sender, EventArgs e)
        {
            MessageBox.Show((sender as DirectUILabel).Text);
        }
    }
}
